package pol.example;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class main {
    public static void main(String[] args) {
        try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(hj.class)) {
            try {
                User user = context.getBean(User.class);
                System.out.println(user);
            } catch (Exception e) {
                System.err.println("Failed to get User bean: " + e.getMessage());
                e.printStackTrace();
            }
        } catch (Exception e) {
            System.err.println("Failed to create ApplicationContext: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
